<template>
  <div class="BoxTitle flex-x-start">
    <el-image class="icon" :src="getAssetsFile(file, icon)" fit="contain" />
    <span class="value">{{ title }}</span>
  </div>
</template>
<script setup lang="ts">
defineProps({
  file: {
    type: String
  },
  icon: {
    type: String
  },
  title: {
    type: String
  }
});

const getAssetsFile = (file: any, icon: any) => {
  // return () => import(`@/assets/images/${file}/${icon}.png`);
  return new URL(`/src/assets/images/${file}/${icon}.png`, import.meta.url).href;
};
</script>
<style scoped lang="scss">
.BoxTitle {
  color: #ffffff;
  text-shadow: 0px 0px 9px rgba(32, 22, 0, 0.45);
  font-size: 18px;
  height: 30px;
  font-weight: bold;
  display: flex;
  align-items: center;
  margin-left: -10px;

  .icon {
    width: 22px;
    height: 22px;
    margin: 0 10px 0 20px;
  }
}
</style>
